#include "GetKeyTest.h"
#include "AlertMessage.h"
#include "TraceEX.h"
#include "Convert.h"
#include <windows.h>  
#define KEY_DOWN(vk_code) (GetAsyncKeyState(vk_code) & 0x8000 ? 1 : 0)  
#define KEY_UP(vk_code) (GetAsyncKeyState(vk_code) & 0x8000 ? 0 : 1)
using namespace cocos2d;
GetKeyTest::GetKeyTest(){
}
GetKeyTest::~GetKeyTest(){
}
void GetKeyTest::showScene(){
	CCDirector *pDirector = CCDirector::sharedDirector();
	pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
	CCSize size = pDirector->getWinSize();
	CCScene * pScene = CCScene::create();
	CCSprite* pFlag =CCSprite::create("flag.png");
	pFlag->setPosition(ccp(50,size.height - 50));
	pScene->addChild(pFlag);
	CCLayer* pLayer = CCLayer::create();
	pLayer->setTag(1010);
	pScene->addChild(pLayer);
	pDirector->replaceScene(pScene);
	CCSprite* pSprite = CCSprite::create("xiaoguai/11.png");
	pSprite->setPosition(ccp(size.width*0.5 , size.height*0.5));
	pSprite->setTag(10020);
	pLayer->addChild(pSprite);
}

void GetKeyTest::keyboardHook(){
	  if( KEY_DOWN( VK_DOWN ) ){
  
		}
}